<style>
#weixin-toplist{margin-top:37px;}
#weixin-toplist > .left {width:251px;float:left;}
#weixin-toplist > .right {width:251px;float:right;}
#weixin-toplist > .main {background-color:#FDFDFF;padding:26px;margin-left:251px;margin-right:251px;min-height: 1000px;}
#weixin-toplist > .main .big-t{background-color:#2FBDE1;line-height: 230px;text-align:center;font-size:44px;color:#fff;}
#weixin-toplist > .main .funb{height:35px;line-height:35px;}
#weixin-toplist > .main .funb a span{color:#3C3431;}
#weixin-toplist > .main .funb .day{background:url(/mprank/img/day-bg.jpg);width:129px;height:32px;float:right;text-align:right;padding-right:15px;padding-top:3px;}
#weixin-toplist > .main .funb .day2{height:32px;float:right;}
#weixin-toplist > .main .funb .dw-toggle{background:url(/mprank/img/dw-toggle-w.jpg);width:201px;height:35px;float:left;}
#weixin-toplist > .main .funb .dw-toggle span{display:inline-block;width:47%;text-align:center;color:#3C3431;}
#weixin-toplist > .main .funb{padding:15px;}
#weixin-toplist > .main .next-pre{height:40px;padding:15px;}
#weixin-toplist > .main .next-pre a{width:150px;line-height:40px;display:block;background:url(/skin/img/next-button.png);text-align:center;color:#E0E8EA;}
#weixin-toplist > .main .next-pre .next{float:right;}
#weixin-toplist > .main .next-pre .pre{float:left;}
</style>

<div id="weixin-toplist" class="n-max-width n-middle">
	<div class="left">
		<?php
		$m = n_mod('article');
		$m->menu($data['cid']);
		?>
	</div>
	<div class="right">
		<?php
		$t = n_mod('weixin');
		$t->commend();

		?>
		<?php n_mod('weixin')->competeList();?>
	</div>
	<div class="main">
		<?php
		$t = n_mod('weixin');
		$t->imgTab();

		?>

		<link href="/skin/css/bootstrap.min.css" rel="stylesheet">
		<script type="text/javascript" src="/skin/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="<?=n_js('skin','moment.min')?>"></script>

		<link rel="stylesheet" type="text/css" href="/skin/css/daterangepicker.css" />
		<script src="<?=n_js('skin','daterangepicker')?>"></script>

		<div class="funb">
			<div class="day2">
				<input style="border-radius: 5px;width:180px;" type="text" name="" class="dpicker" value="" />
			</div>
			<div class="dw-toggle">
				<a href="<?=n_url('cart', 'mycart')?>"><span>日榜</span></a>
				<a href="<?=n_url('cart', 'mycartWeekly')?>"><span><b>周榜</b></span></a>
			</div>
		</div>
		<div class="list">
			<?php n_mod('mprank')->rankTable($data, 'Y' ,'day',$data['perpage']*($data['page']-1));?>

		</div>
		<script>
		$(document).ready(function(){
			$('.dpicker').daterangepicker({
			    "dateLimit": {
			        "days": 7
			    },
				    "minDate": "01/01/2016",
				    "maxDate": "<?=$data['mdate']?>",
			    "startDate": "<?=$data['sdate']?>",
			    "endDate": "<?=$data['edate']?>",
			    "opens": "left"
			}, function(start, end, label) {
				console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
			});

			$('.dpicker').on('apply.daterangepicker', function(ev, picker) {
				location.href = "mycartWeekly.html?cid=<?=$data['cid']?>&date="+$(this).val();
			});

		});
		</script>
	</div>
</div>
